package com.mia.props.common.entities;

import com.mia.props.Props;
import com.mia.props.common.TileProps;

public class TileShowerHead extends TileProps {
   public void updateEntity() {
      if (this.worldObj.isRemote) {
         if (this.isRunning) {
            double xp = (double)((float)this.xCoord + 0.5F);
            double yp = (double)((float)this.yCoord + 0.35F);
            double zp = (double)((float)this.zCoord + 0.5F);

            for(int i = 0; i < this.rand.nextInt(20) + 10; ++i) {
               double spread = 0.02D;
               xp += this.rand.nextGaussian() * spread;
               zp += this.rand.nextGaussian() * spread;
               Props.proxy.renderCustomRain(this.worldObj, xp, yp, zp, 0.75F);
            }
         }

      }
   }

   public boolean canUpdate() {
      return true;
   }
}
